import request  from "@/utils/request.js"

export const authorlistServer = (params) =>{
    return request.get('/manager/authorlist',{params:params})
}

export const addauthorServer = (addData) =>{
    const params = new URLSearchParams();
    for (let key in addData){
          params.append(key,addData[key]);
    }
    return request.post('/manager/addauthor',params)
}

export const updataauthorServer = (addData) =>{
    const params = new URLSearchParams();
    for (let key in addData){
          params.append(key,addData[key]);
    }
    return request.put('/manager/updateauthor',params)
}

export const delauthorServer = (id) =>{
    return request.delete('/manager/delauthor/'+id)
}

export const beauthorServer = (bi) =>{
    return request.patch('/author/beauthor/'+bi)
}